package cn.wp.common.core.exception;

import cn.wp.common.core.dto.WpResult;

/**
 * 远程服务错误包装
 * Created by chenyb on 2019/09/24
 */
public class WpRestException extends WpException {

    private static final long serialVersionUID = 1L;

    private WpResult wpResult;

    public WpRestException() {
        super();
    }

    public WpRestException(WpResult wpResult) {
        super(wpResult.getMessage());
        this.wpResult = wpResult;
    }

    public WpRestException(String message, Throwable cause) {
        super(message, cause);
    }

    // 提供一个有参数的构造方法，可自动生成
    public WpRestException(String message) {
        super(message);
    }

    public WpResult getWpResult() {
        return wpResult;
    }

}